package org.bioversityinternational.mgbms.model.domain;

// Generated 13 oct. 2011 12:11:05 by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * NewCentre generated by hbm2java
 */
@Entity
@Table(name = "New_Centre", schema = "dbo", catalog = "imgbms")
public class NewCentre implements java.io.Serializable {

	private Integer id;
	private Address address;
	private Centre centre;
	private Country country;
	private CentreType centreType;
	private String pidCode;
	private String faoCode;
	private String name;
	private Date startDate;
	private Date endDate;
	private Boolean archived;
	private String email;
	private String tel;
	private String fax;
	private String url;
	private Date lastUpdated;
	private String descriptions;
	private String acronym;
	private Set<Login> logins = new HashSet<Login>(0);

	public NewCentre() {
	}

	public NewCentre(String pidCode) {
		this.pidCode = pidCode;
	}

	public NewCentre(Address address, Centre centre, Country country,
			CentreType centreType, String pidCode, String faoCode, String name,
			Date startDate, Date endDate, Boolean archived, String email,
			String tel, String fax, String url, Date lastUpdated,
			String descriptions, String acronym, Set<Login> logins) {
		this.address = address;
		this.centre = centre;
		this.country = country;
		this.centreType = centreType;
		this.pidCode = pidCode;
		this.faoCode = faoCode;
		this.name = name;
		this.startDate = startDate;
		this.endDate = endDate;
		this.archived = archived;
		this.email = email;
		this.tel = tel;
		this.fax = fax;
		this.url = url;
		this.lastUpdated = lastUpdated;
		this.descriptions = descriptions;
		this.acronym = acronym;
		this.logins = logins;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "addressId")
	public Address getAddress() {
		return this.address;
	}

	public void setAddress(Address address) {
		this.address = address;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "partOf")
	public Centre getCentre() {
		return this.centre;
	}

	public void setCentre(Centre centre) {
		this.centre = centre;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "countryId")
	public Country getCountry() {
		return this.country;
	}

	public void setCountry(Country country) {
		this.country = country;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "centreTypeId")
	public CentreType getCentreType() {
		return this.centreType;
	}

	public void setCentreType(CentreType centreType) {
		this.centreType = centreType;
	}

	@Column(name = "pidCode", nullable = false, length = 13)
	public String getPidCode() {
		return this.pidCode;
	}

	public void setPidCode(String pidCode) {
		this.pidCode = pidCode;
	}

	@Column(name = "faoCode", length = 13)
	public String getFaoCode() {
		return this.faoCode;
	}

	public void setFaoCode(String faoCode) {
		this.faoCode = faoCode;
	}

	@Column(name = "name", length = 120)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "startDate", length = 23)
	public Date getStartDate() {
		return this.startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "endDate", length = 23)
	public Date getEndDate() {
		return this.endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	@Column(name = "archived")
	public Boolean getArchived() {
		return this.archived;
	}

	public void setArchived(Boolean archived) {
		this.archived = archived;
	}

	@Column(name = "email", length = 50)
	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Column(name = "tel", length = 50)
	public String getTel() {
		return this.tel;
	}

	public void setTel(String tel) {
		this.tel = tel;
	}

	@Column(name = "fax", length = 50)
	public String getFax() {
		return this.fax;
	}

	public void setFax(String fax) {
		this.fax = fax;
	}

	@Column(name = "url", length = 128)
	public String getUrl() {
		return this.url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "lastUpdated", length = 16)
	public Date getLastUpdated() {
		return this.lastUpdated;
	}

	public void setLastUpdated(Date lastUpdated) {
		this.lastUpdated = lastUpdated;
	}

	@Column(name = "descriptions")
	public String getDescriptions() {
		return this.descriptions;
	}

	public void setDescriptions(String descriptions) {
		this.descriptions = descriptions;
	}

	@Column(name = "acronym", length = 50)
	public String getAcronym() {
		return this.acronym;
	}

	public void setAcronym(String acronym) {
		this.acronym = acronym;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "newCentre")
	public Set<Login> getLogins() {
		return this.logins;
	}

	public void setLogins(Set<Login> logins) {
		this.logins = logins;
	}

}
